1. Field of the Invention
The present invention relates to a document management apparatus, a method of controlling the document management apparatus, and a storage medium, and more particularly to a technique for initialization in a document management apparatus.
2. Description of the Related Art
In recent years, with the widespread use of a file server having a document management function (hereinafter also referred to as the “document management apparatus”), there has been an increasing opportunity for a plurality of users to use the same document management apparatus. In the document management apparatus shared by the users, the access rights of the users are assigned on a file basis or on a folder basis, whereby files can be used only by specific users or shared within a group.
Such a document management apparatus has a system administrator for performing maintenance thereof. The system administrator can access all files or folders to change or delete the same. Further, the system administrator can initialize the document management apparatus and collectively delete all the files or folders.
In a case where the system administrator collectively deletes all the files or folders stored in the document management apparatus, it is required to delete a large number of files or folders therefrom, which takes time and makes it impossible to perform other operations. Particularly in the case of a built-in document management apparatus, a large number of management files are used for protection against e.g. power interruption of the document management apparatus, whereby it takes much longer time to delete the files or folders than in the case of a general file server. This is for the following reasons: The document management apparatus has, as a function peculiar to the built-in apparatus, for example, information on subfolders in the form of lists in order to increase the acquisition speed of file lists, and hence when files or folders are deleted or moved, list information of parent folders is updated. Further, backup files are created in order to prevent a mismatch from occurring between files or folders when the apparatus is re-started after being forcedly powered off during halfway through the deletion process.
In Japanese Patent Laid-Open Publication No. 2000-305829, a deletion flag is set in response to an instruction for deleting a file, and a file for which the deletion flag has been set is not displayed in a file list. Then, after the lapse of a predetermined time period, the file for which the deletion flag has been set is actually deleted in background processing. This causes deletion of the files to be apparently completed immediately after the instruction for deleting the file is given, and hence it is possible to perform other operations.
In a general document management apparatus, when a file is being manipulated, the file is locked such that users other than a user manipulating the file cannot modify or change the file, and hence when the file is attempted to be deleted, the deletion fails. As a consequence, when the user is manipulating a file, if a system administrator intends to perform collective deletion of files including the file, an error occurs.
According to the method disclosed in Japanese Patent Laid-Open Publication No. 2000-305829, if a file is being manipulated, the collective deletion of files including the file fails, and hence available resources are reduced until execution of deletion processing at a next timing. Further, when the document management apparatus is configured to record history on operations, a log of the deletion failure is recorded in the history. Therefore, the system administrator is required to execute collective deletion only after a file manipulation by a user is terminated. Particularly in the built-in document management apparatus, it takes a long time to delete files and folders, which brings about a problem that it takes much time for the system administrator to perform maintenance of the apparatus.